home *** CD-ROM | disk | FTP | other *** search
- #
- # Test to see if link kit is installed.
- #
- linkchk() {
- # Set PERM variable used in linkchk().
- if [ -f /etc/perms/extmd ]; then
- PERM=/etc/perms/extmd
- elif [ -f /etc/perms/inst ]; then
- PERM=/etc/perms/inst
- else
- error "Cannot locate LINK packages permlist.
- Needed to verify linkkit installation"
- return 1
- fi
-
- # Test to see if link kit is installed.
- until fixperm -i -d LINK $PERM
- do case $? in
- 4) echo "\nThe Link Kit is not installed." ;;
- 5) echo "\nThe Link Kit is only partially installed." ;;
- *) error "fixperm failed testing for Link Kit. Exiting."
- return 1 ;;
- esac
-
- # Not fully installed. Do so here.
- echo "\nThe link kit must be installed to run this program."
- getyn "\nDo you wish to install it now?" || {
- # Answered no.
- echo "\nThe linkkit is not installed."
- return 1
- }
-
- # Answered yes, so install the link kit.
- echo "\nInvoking /etc/custom\n"
- /etc/custom -o -i LINK || {
- # Custom exited unsuccessfully.
- error "Custom failed to install Link Kit successfully."
- return 1
- }
- done
- return 0
- }
-